home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 102 / Computer Shopper 102 / Computer SHOPPER_102.iso / multimed.ia / violent / shared.dir / 00547.ls < prev    next >
Encoding:
Text File  |  1996-04-15  |  3.9 KB  |  161 lines

  1. on cleanChannels Begin, end
  2.   repeat with var = Begin to end
  3.     puppetSprite(var, 0)
  4.   end repeat
  5. end
  6.  
  7. on putBar num
  8.   repeat with var = 5 to 33
  9.     puppetSprite(var, 1)
  10.     if var >= (22 + num) then
  11.       set the visible of sprite var to 0
  12.     end if
  13.   end repeat
  14.   updateStage()
  15. end
  16.  
  17. on switchOn num
  18.   global gPage
  19.   putOn(the clickOn - 21)
  20.   updateStage()
  21. end
  22.  
  23. on putOn num
  24.   global gPage, gMaxPage
  25.   repeat with myVar = 0 to gMaxPage - 1
  26.     set the castNum of sprite (22 + myVar) to 513 + (myVar * 2)
  27.   end repeat
  28.   set the castNum of sprite (22 + num - 1) to 513 + ((num - 1) * 2) + 1
  29.   updateStage()
  30.   set gPage to num
  31. end
  32.  
  33. on setBookmark
  34.   global gChapter, gSection, gPage, gCorrect, gBookPage, gBookFrame, gBookCorrect, gBookMovie
  35.   go(#loop)
  36.   set gBookFrame to the frame
  37.   set gBookMovie to the movie
  38.   set gBookCorrect to gCorrect
  39.   set gBookPage to gPage
  40. end
  41.  
  42. on findBookmark
  43.   global gBookFrame, gBookMovie, gBookPage, gBookCorrect, gPage, gChapter, gCorrect
  44.   if gBookMovie = EMPTY then
  45.     exit
  46.   end if
  47.   cleanChannels(5, 48)
  48.   if gBookMovie = the movie then
  49.     go(gBookFrame)
  50.   else
  51.     go(gBookFrame, gBookMovie)
  52.   end if
  53.   set gPage to gBookPage
  54.   set gCorrect to gBookCorrect
  55.   if (gPage > 0) and (gChapter > 4) and (gChapter < 11) then
  56.     putOn(gPage)
  57.   end if
  58. end
  59.  
  60. on setBookmark2
  61.   global gChapter, gSection, gPage, gCorrect, gBookPage, gBookFrame, gBookCorrect, gBookMovie
  62.   go(#loop)
  63.   set gBookFrame to the frame
  64.   set gBookMovie to the movie
  65.   set gBookCorrect to gCorrect
  66.   set gBookPage to gPage
  67. end
  68.  
  69. on findBookmark2
  70.   global gBookFrame, gBookMovie, gBookPage, gBookCorrect, gPage, gChapter, gCorrect
  71.   if gBookMovie = EMPTY then
  72.     exit
  73.   end if
  74.   cleanChannels(5, 48)
  75.   if gBookMovie = the movie then
  76.     go(gBookFrame)
  77.   else
  78.     go(gBookFrame, gBookMovie)
  79.   end if
  80.   set gPage to gBookPage
  81.   set gCorrect to gBookCorrect
  82.   if (gPage > 0) and (gChapter > 4) and (gChapter < 11) then
  83.     putOn(gPage)
  84.   end if
  85. end
  86.  
  87. on getWhere myString
  88.   global gPage
  89.   updateStage()
  90.   if myString = EMPTY then
  91.     exit
  92.   end if
  93.   set myMovie to getFirst(myString)
  94.   set head to the number of chars in myMovie + 2
  95.   set myString to chars(myString, head, the number of chars in myString)
  96.   set section to getFirst(myString)
  97.   set head to the number of chars in section + 2
  98.   set myString to chars(myString, head, the number of chars in myString)
  99.   set page to getFirst(myString)
  100.   set head to the number of chars in page + 2
  101.   set myString to chars(myString, head, the number of chars in myString)
  102.   if myString = EMPTY then
  103.     set myMarker to myMovie & "." & section & "." & page
  104.   else
  105.     set myMarker to myMovie & "." & section & "." & page & "t"
  106.   end if
  107.   go(myMarker, myMovie & "-" & section & EMPTY)
  108.   set gPage to value(page)
  109.   if gPage > 0 then
  110.     putOn(gPage)
  111.   end if
  112. end
  113.  
  114. on getFirst myString
  115.   if (char 2 of myString = ".") or (char 2 of myString = EMPTY) then
  116.     return chars(myString, 1, 1)
  117.   end if
  118.   if (char 3 of myString = ".") or (char 3 of myString = EMPTY) then
  119.     return chars(myString, 1, 2)
  120.   end if
  121. end
  122.  
  123. on playEye mySound
  124.   global gSound
  125.   if gSound = 0 then
  126.     set gSound to 1
  127.     sound stop 1
  128.     set the blend of sprite the clickOn to 70
  129.     puppetSound(mySound)
  130.     set the soundEnabled to 1
  131.     updateStage()
  132.     startTimer()
  133.     repeat while the timer < 100
  134.       nothing()
  135.     end repeat
  136.     repeat while soundBusy(1)
  137.       if the mouseDown then
  138.         exit repeat
  139.       end if
  140.     end repeat
  141.     sound stop 1
  142.     puppetSound(0)
  143.     set the soundEnabled to 0
  144.     if the type of sprite 4 = 16 then
  145.       set the sound of cast the castNum of sprite 4 to 1
  146.       set the volume of sprite 4 to 200
  147.     end if
  148.   else
  149.     set gSound to 0
  150.     sound stop 1
  151.     set the soundEnabled to 0
  152.     puppetSound(0)
  153.     set the blend of sprite the clickOn to 100
  154.     updateStage()
  155.     if the type of sprite 4 = 16 then
  156.       set the sound of cast the castNum of sprite 4 to 1
  157.       set the volume of sprite 4 to 200
  158.     end if
  159.   end if
  160. end
  161.